Stellar activity induces apparent radial velocity (RV) variations in late-type main-sequence stars that may hamper the detection of low-mass planets and the measurement of their mass. We use simultaneous measurements of the active planet host star HD189733 with high-precision optical photometry by the MOST satellite and high-resolution spectra by SOPHIE. We apply on this unique dataset a spot model to predict the activity-induced RV variations and compare them with the observed ones. The model is based on the rotational modulation of the stellar flux. A maximum entropy regularization is applied to find a unique and stable solution for the distribution of the active regions versus stellar longitude. The RV variations are synthesized considering the effects on the line profiles of the brightness perturbations due to dark spots and bright faculae and the reduction of the convective blueshifts in the active regions. The synthesized RV time series shows a remarkably good agreement with the observed one although variations on timescales shorter than 4-5 days cannot be reproduced by our model. Persistent active longitudes are revealed by the spot modelling. They rotate with slightly different periods yielding a minimum relative amplitude of the differential rotation of \Delta \Omega / \Omega = 0.23 \pm 0.10. The method proves capable of reducing the power of the activity-induced RV variations by a factor from 2 to 10 at the rotation frequency and its harmonics up to the third. Thanks to the high-precision space-borne photometry delivered by CoRoT, Kepler, or later PLATO, it is possible to map the longitudinal distribution of active regions in late-type stars and apply the method presented in this paper to reduce remarkably the impact of stellar activity on their RV jitter allowing us to confirm the detection of low-mass planets or refine the measurement of their mass.